from flask import Blueprint

from src.util.hardware_util import hardware_util
from src.util.result import success

hardware_bp = Blueprint('hardware', __name__)

@hardware_bp.route('/info')
def info():
    cpu = hardware_util.get_cpu_info()
    memory = hardware_util.get_memory_info()
    disk = hardware_util.get_disk_infos()
    return success({'cpu': cpu, 'memory': memory, 'disk': disk})

